-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: fixtures to fill data in a local environment #303
Conversation
from openfoodfacts import Flavor | ||
from sqlalchemy.orm import Session | ||
|
||
from app.db import Base, engine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when i tried to run it locally - poetry run python fixtures/import_data.py
- i get the following error
Traceback (most recent call last):
File "....../open-prices/fixtures/import_data.py", line 5, in <module>
from app.db import Base, engine
ModuleNotFoundError: No module named 'app'
@@ -0,0 +1,1073 @@ | |||
users: | |||
- user_id: "john_doe" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to be sure, these users are fake so it won't be possible to login with them, right ? or do you have a way to bypass the OFF login ?
@@ -46,6 +46,12 @@ The run the migration of the database with | |||
make migrate-db | |||
``` | |||
|
|||
The load the fixtures with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The load the fixtures with | |
You can load some fixtures with |
86b4729
to
294261f
Compare
Closing as this does not work anymore, following the migration from FastAPI to Django (#366).. |
What